var style = {
    color: "red",
    border: "1px #000 solid"
};
var HelloWorld = React.createClass({
    render: function () {
        return <p>Hello,{this.props.name1+"  " +this.props.name2}</p>
    }
});

var HelloUniverse = React.createClass({
    getInitialState: function () {
        return {
            name1: "name1",
            name2: "name2"
        }
    },
    handleChange: function (e) {
        this.setState({
            name1: e.target.value,
            name2: e.target.value
        })
    },
    render: function () {
        return <div>
            <HelloWorld {...this.state}/>
            <br/>
            <input type="text" onChange={this.handleChange}/>
        </div>
    }
});
ReactDOM.render(<div style={style}><HelloUniverse/></div>, document.getElementById("container"));